package day10;

//本类是用来演示继承中方法重写的演示demo
public class Test01 {
    public static void main(String[] args) {
//        Father f = new Father();
//        f.eat();
        Son s = new Son();
        s.eat();
        s.play();
    }
}

class Father {
    public void eat() {

        System.out.println("爸爸爱吃肉");
    }

    public void play() {

        System.out.println("爸爸爱风筝");
    }

}

class Son extends Father {

    public void eat() {
        System.out.println("儿子爱吃鱼");

    }

    public void play() {
        System.out.println("儿子爱游戏");
    }
}